/*6：学士后结业考试的时间是每月倒数第二个周六上午8点，输出今年的考试时间
，用yyyy/MM/dd hh时 的格式输出*/
package Work0529;

import java.text.SimpleDateFormat;
import java.util.Calendar;

public class Bachelor {

	public static void main(String[] args) {
		Calendar test = Calendar.getInstance();
		int satyrday = 0;
		System.out.println("今年考试时间为:");
		for (int a = 0; a < 12; a++) {
			test.set(Calendar.MONTH, a);
			test.set(Calendar.HOUR, 8);
			for (int b = test.getActualMaximum(Calendar.DATE); b >= 1; b--) {
				test.set(Calendar.DATE, b);
				if (test.get(Calendar.DAY_OF_WEEK) == Calendar.SATURDAY) {
					satyrday++;
					if (satyrday == 2) {
						String day = new SimpleDateFormat("yyyy/MM/dd hh时").format(test.getTime());
						System.out.println(day);
						satyrday = 0;
						break;

					}
				}

			}
		}
	}

}
